home *** CD-ROM | disk | FTP | other *** search
/ Aminet 24 / Aminet 24 (1998)(GTI - Schatztruhe)[!][Apr 1998].iso / Aminet / dev / c / AmiVoGL_MDEV.lha / src / valloc.c < prev    next >
C/C++ Source or Header  |  1994-04-12  |  381b  |  22 lines

  1. #include "vogl.h"
  2.  
  3. /*
  4.  * vallocate
  5.  *
  6.  *    Allocate some memory, barfing if malloc returns NULL.
  7.  */
  8. char * vallocate(unsigned size)
  9. {
  10. char    *p, buf[60];
  11.  
  12. if ((p = (char *)malloc(size)) == (char *)0) {
  13.     sprintf(buf,"vallocate: request for %d bytes returned NULL", size);
  14.     verror(buf);
  15.     }
  16.  
  17. return (p);
  18. }
  19.  
  20. /* ------------------------------------------------------------------------ */
  21.  
  22.